package springboot.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;

import springboot.entity.User;

@CacheConfig(cacheNames="baseCache")
public interface UserMapping1 {
	@Insert("insert into user values(null, #{name},123,#{age})")
	int insertUser(@Param("name")String  name,@Param("age")Integer age);
	@Cacheable
	@Select("select * from user where id=#{id}")
	User findUser(@Param("id")Integer id);
    
}
